package com.justnow.offer;

import java.util.List;

/**
 * @author justnow
 * Created on 2020-08-30
 * Description
 *
 * 给定一个表达式字符串，里面包含正整数、"+"、"-"，请添加括号()，使得表达式的结果最大，并返回最大值
 * 例如：表达式 "1-2-3+4"，添加括号后为"1-(2-3)+4"，得到最大值结果为6.
 */
public class Solution2 {

    public int getMaxResult (String expression) {
        // write code here
        char[] chars = expression.toCharArray();
        int max = Integer.MIN_VALUE;
        int length = chars.length;
        int result = 0;
        for (int i = 0; i < length; i = i + 2) {
            int start = i;
            for (int j = i + 2; j < length; j++) {
            }
        }
        return 0;
    }

    public int getSum(char[] chars, int start, int end) {
        int result = chars[start];
        while (start < end) {
            if (start == 0)
                continue;
            else {

            }
        }

        return 0;
    }


}
